package o;

import android.graphics.drawable.Drawable;
import android.view.View;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import java.lang.ref.WeakReference;

public class h extends SkinAttr {

    static final class e extends fkz<SkinAttr, Drawable> {
        private WeakReference<CollapsingToolbarLayout> ˋ;

        public /* synthetic */ void ॱ(Object obj) {
            ˏ((Drawable) obj);
        }

        private e(CollapsingToolbarLayout collapsingToolbarLayout) {
            this.ˋ = new WeakReference(collapsingToolbarLayout);
        }

        public void ˏ(Drawable drawable) {
            CollapsingToolbarLayout collapsingToolbarLayout = (CollapsingToolbarLayout) this.ˋ.get();
            if (collapsingToolbarLayout != null) {
                collapsingToolbarLayout.setContentScrim(drawable);
            }
        }
    }

    public h() {
        this.ˎ = 0;
    }

    public void ˎ(View view, boolean z) {
        if (view instanceof CollapsingToolbarLayout) {
            CollapsingToolbarLayout collapsingToolbarLayout = (CollapsingToolbarLayout) view;
            if ("drawable".equals(this.attrValueTypeName) || "color".equals(this.attrValueTypeName)) {
                this.ʽ = "drawable";
                fks.ˎ(view.getContext(), this, new e(collapsingToolbarLayout)).ॱ(z);
            }
        }
    }
}
